package com.tubang.organization.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tubang.common.entity.BaseEntity;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 角色-菜单
 * </p>
 *
 * @author wsl
 * @since 2017-11-29
 */
@SuppressWarnings("serial")
@TableName("tb_role_menu")
public class RoleMenuEntity extends BaseEntity<RoleMenuEntity> {
    /**
     * 角色编号
     */
    @TableField("role_id")
    private String roleId;
    /**
     * 菜单编号
     */
    @TableField("menu_id")
    private String menuId;

    /**
     * 菜单等级
     */
    @TableField("menu_lev")
    private String menuLev;

    /**
     * 关系表父级id
     */
    @TableField("parent_id")
    private String parentId;


    public String getRoleId() {
        return roleId;
    }

    public RoleMenuEntity setRoleId(String roleId) {
        this.roleId = roleId;
        return this;
    }

    public String getMenuId() {
        return menuId;
    }

    public RoleMenuEntity setMenuId(String menuId) {
        this.menuId = menuId;
        return this;
    }

    public String getMenuLev() {
        return menuLev;
    }

    public void setMenuLev(String menuLev) {
        this.menuLev = menuLev;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    @Override
    protected Serializable pkVal() {
        return this.roleId;
    }

    @Override
    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("RoleMenu{");
        stringBuilder.append("roleId=");
        stringBuilder.append(roleId);
        stringBuilder.append(", menuId=");
        stringBuilder.append(menuId);
        stringBuilder.append("}");
        return stringBuilder.toString();
    }
}
